﻿/***************************************************************************************************
 * Copyright 2025-2025 x-tools-author(x-tools@outlook.com). All rights reserved.
 *
 * The file is encoded using "utf8 with bom", it is a part of xTools project.
 *
 * xTools is licensed according to the terms in the file LICENCE(GPL V3) in the root of the source
 * code directory.
 **************************************************************************************************/
#include "common/xui.h"

namespace xFlow {
class xFlow;
} // namespace xFlow

class MainWindow : public xUi
{
    Q_OBJECT
public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow() override;
    void load(const QString &fileName = QString());

protected:
    void closeEvent(QCloseEvent *event) override;

private:
    xFlow::xFlow *m_flow{nullptr};

private:
    void save(const QString &fileName = QString());

    void onNew();
    void onImport();
    void onExport();
};
